<!DOCTYPE html>
<html lang="en" class="no-js" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<head th:include="admin/layout">

</head>
<body class="gray-bg" data-controller="users" data-action="add">
	<div class="wrapper wrapper-content" style="padding: 60px;">
   		 <div id="page-wrapper" style="min-height: 416px;">
            <div class="row">
                <div class="col-lg-12">
                    <h4 class="page-header">新增管理人员</h4>
                </div>
                <!-- /.col-lg-12 -->
            </div>
             <form id="user_form" th:action="${'/user/save'}" class="form-horizontal m-t" style="width:70%;" method="post">
          			<div class="col-md-12">
    					<div class="form-group">
        					<label class="col-sm-3 control-label">姓名</label>
        					<div class="col-sm-9">
            					<input type="text" class="form-control" required="" maxlength="20" aria-required="true" name="name" placeholder="不能超过20字符"/>
        					</div>
    					</div>
    					<div class="form-group">
        					<label class="col-sm-3 control-label">年龄</label>
        					<div class="col-sm-9">
            					<input type="text" onkeyup="(this.v=function(){this.value=this.value.replace(/[^0-9-]+/,'');}).call(this)" onblur="this.v();" class="form-control" required="" maxlength="3" name="age" placeholder="请输入有效的年龄"/>
        					</div>
    					</div>
    					<div class="form-group">
        					<label class="col-sm-3 control-label">权限</label>
        					<div class="col-sm-9">
            					<select class="form-control" name="role">
        								<option th:value="2" th:text="文章管理员"/>
        								<option th:value="3" th:text="文章超级管理员"/>
        								<option th:value="4" th:text="专栏管理员"/>
    							 </select>
        					</div>
    					</div>
					</div>
						<div class="form-group">
        					<div class="col-sm-12 col-sm-offset-3">
            					<button class="btn btn-primary" type="submit">确认提交</button>
            						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            					<button class="btn btn-white" type="button" onclick="back();">取消提交</button>
        					</div>
    					</div>
      		</form>
     </div>
    </div>
    <script type="text/javascript">
    	function back(){
    		history.back();
    	}
    </script>
</body>
</html>